<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>统计代码</title>
  <link rel="stylesheet" href="/css/theme/font-awesome.min.css" type="text/css" />
        <link rel="stylesheet" href="/css/theme/bootstrap.min.css" type="text/css" />
        <link rel="stylesheet" href="/javascript/theme/libs/jquery-easyui-1.4/themes/default/easyui.css" type="text/css" />
        <link rel="stylesheet" href="/css/theme/App.css" type="text/css" />
        <link rel="stylesheet" href="/css/theme/custom.css" type="text/css" />
        <script src="/javascript/theme/libs/jquery-1.9.1.min.js"></script>
        <script src="/javascript/theme/libs/jquery-easyui-1.4/jquery.easyui.min.js"></script>
        <script src="/javascript/theme/libs/bootstrap.min.js"></script>
        <script src="/javascript/theme/App.js"></script>
        <script type="text/javascript" src="/javascript/My97DatePicker/WdatePicker.js"></script>
        <script type="text/javascript" src="/javascript/report/FusionCharts.js"></script>
        <script type="text/javascript" src="../javascript/report/Date.js"></script>
        <style type="text/css">
body {
	font: 14px/18px Arial, Helvetica, simsun, sans-serif;
	background: #FFFFFF;
	color: #000000;
}

.alink {
	text-decoration: underline;
	cursor: pointer;
	color: #0000CC;
}

.alinkClicked {
	color: #0000CC;
}

.showVal {
	font-family: Arial;
	font-size: 12px;
	font-weight: normal;
	font-style: normal;
	text-decoration: none;
	color: #333333;
}

#alarmMsgDialog {
	font-family: Arial;
	font-size: 12px;
	margin: 0 auto;
	padding-left: 5px;
	padding-right: 3px;
}

#cates,#locals,#cateClean,#localClean {
	display: none;
}

#loading {
	position: absolute;
	text-align: center;
	width: 200px;
	height: 200px;
	left: 50%;
	top: 30%;
	margin: -100px 0 0 -100px;
	display: block;
}

#mainTable,#totalTable {
	text-align: center;
	font-family: Arial;
	font-size: 14px;
}
</style>
</head>
<body>
	 <div id="content" style="OVERFLOW-X:yes;OVERFLOW-Y:auto;">
            <div id="content-container">
                <form  class="form-horizontal" name="searchform" role="form">
                    <div class="portlet">
                        <div class="portlet-header">
                            <h3>
                                <i class="fa fa-tasks"></i>
                                统计代码生成工具
                            </h3>
                        </div>
                        <!-- /.portlet-header -->
<div class="portlet-content">
  </br>
   <div class="form-group">
				<label class="col-md-2">&nbsp;&nbsp;统计平台:</label>
                <div class="col-md-2">
                    <select name="platForm" id="platForm" style="width:130px;height:25px" onchange="selectPlatForm();">
						<option value ="PC" selected="selected">PC</option>
						<option value ="M">M</option>
						<option value="WEIXIN">WEIXIN</option>
					</select>
                </div>
        </div>
      <div class="form-group">
				<label class="col-md-2">&nbsp;&nbsp;统计类型:</label>
                <div class="col-md-2">
                   <select name="eventType" id="eventType" onchange="selectEventType();">
  						<option value ="newPv" selected="selected">新页面基本流量统计</option>
  						<option value ="click">按钮点击量统计</option>
  						<option value ="abClick">点击量AB测统计</option>
  						<option value="fromIn">站内加入口统计</option>
  						<option value="fromOut">站外加入口统计</option>
  						<option value="abPv">页面AB测流量统计</option>
  						<option value ="unitParam">详情页添加单元参数统计</option>
  						<option value="extraParam">添加额外参数统计</option>
  						<option value="tanchuPv">弹出层次数统计</option>
					</select>
                </div>
       </div>
       <div class="form-group" id="pageTypeDiv" style="display:none">
				<label class="col-md-2">&nbsp;&nbsp;页面类型:</label>
                <div class="col-md-2">
                  <select name="pageType" id="pageType" onchange="selectPageType();">
  						<option value ="list" selected="selected">信息列表页</option>
  						<option value ="detail">信息详情页</option>
  						<option value="home">城市首页</option>
  						<option value="index">大类索引页</option>
  						<option value ="post">发布页</option>
  						<option value ="my">用户个人中心</option>
  						<option value="vip">商家个人中心</option>
  						<option value="shop">店铺</option>
  						<option value="qiye">招聘企业页</option>
  						<option value="special">活动专题页</option>
  						<option value="site">独立站点页</option>
  						<option value="market">汽车市场页</option>
  						<option value="other">其它</option>
					</select>
                </div>		
	 </div>
	 <div class="form-group" id="tongjiTagDiv" style="display:none">
          <label class="col-md-2">&nbsp;&nbsp;点击事件取名:</label>
          <div class="col-md-2">
          	<input id="tongjiTag" name="tongjiTag" style="width: 168px;"  type=text  value="" /><span style="color:#FF0000;">取名别用汉字哈！</span>
          </div>
	 </div>
	 <div class="form-group" id="fromDiv" style="display:none">
          <label class="col-md-2">&nbsp;&nbsp;入口取名:</label>
          <div class="col-md-2">
          	<input id="from" name="from" style="width: 168px;"  type=text  value="" /><span style="color:#FF0000;">取名别用汉字哈！</span>
          </div>
	 </div>
	 <div class="form-group" id="extraParamDiv" style="display:none">
          <label class="col-md-2">&nbsp;&nbsp;额外参数取名:</label>
          <div class="col-md-2">
          	<input id="extraParam" name="extraParam" style="width: 168px;"  type=text  value="" /><span style="color:#FF0000;">取名别用汉字哈！</span>
          </div>
	 </div>
	 <div class="form-group" id="siteNameDiv" style="display:none">
          <label class="col-md-2">&nbsp;&nbsp;独立站点域名:</label>
          <div class="col-md-2">
          	<input id="siteName" name="siteName" style="width: 168px;"  type=text  value="" /><span style="color:#FF0000;">取名别用汉字哈！</span>
          </div>
	 </div>
	 <div class="form-group" id="tanchuDiv" style="display:none">
          <label class="col-md-2">&nbsp;&nbsp;弹出层取名：:</label>
          <div class="col-md-2">
          	<input id="tanchu" name="tanchu" style="width: 168px;"  type=text  value="" /><span style="color:#FF0000;">取名别用汉字哈！</span>
          </div>
	 </div>
	  <div class="form-group"> &nbsp;&nbsp;&nbsp;&nbsp;
	  <button type="button" onclick="download()" class="btn btn-primary btn-xs">
                           生成代码
      </button>
	  </div>
</div>
</div>
</div><!--portlet-content-->
</div>	
</form>		
    <div class="portlet">
    <div class="portlet-header">
        <h3>
            <i class="fa fa-hand-o-up"></i>
            统计代码规划方案：
        </h3>
    </div>	
      <div class="portlet-content">	
      	    <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover" id="wordtable" data-provide="datatable" data-display-rows="20" >
                    <thead>
					<tr><td>统计代码规划方案：</td></tr>
					<tr><td>
						<textarea name="result" id="result" cols=150 rows=30 readonly="readonly">
						</textarea>
					</td></tr>
				
				</table>
		</div>
 </div>	
</div>	
</body>
<script language="javascript" type="text/javascript">
//初始化	
$(document).ready(function()
		{
			$("#pageTypeDiv").show();
			$("#tongjiTagDiv").hide();
			$("#fromDiv").hide();
			$("#extraParamDiv").hide();
			$("#siteNameDiv").hide();
			$("#tanchuDiv").hide();
		}
);//end document ready

//平台选择响应
function selectPlatForm()
{
	if($("#platForm").val()=="APP")
		{
			alert("暂不支持app平台的规划");
			$("#platForm").get(0).selectedIndex=0;//回复默认选择PC
		}
	
}


//统计类型选择响应
function selectEventType()
{
	if($("#eventType").val()=="newPv")
		{
			$("#pageTypeDiv").show();
			$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
			$("#fromDiv").hide();$("#from").val("");
			$("#extraParamDiv").hide();$("#extraParam").val("");
			$("#siteNameDiv").hide();$("#siteName").val("");
			$("#tanchuDiv").hide();$("#tanchu").val("");
		}
	else if($("#eventType").val()=="click" || $("#eventType").val()=="abClick")
		{
			$("#pageTypeDiv").hide();
			$("#tongjiTagDiv").show();
			$("#fromDiv").hide();$("#from").val("");
			$("#extraParamDiv").hide();$("#extraParam").val("");
			$("#siteNameDiv").hide();$("#siteName").val("");
			$("#tanchuDiv").hide();$("#tanchu").val("");
		}
	else if($("#eventType").val()=="abPv")
	{
		$("#pageTypeDiv").hide();
		$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
		$("#fromDiv").hide();$("#from").val("");
		$("#extraParamDiv").hide();$("#extraParam").val("");
		$("#siteNameDiv").hide();$("#siteName").val("");
		$("#tanchuDiv").hide();$("#tanchu").val("");
	}
	else if($("#eventType").val()=="fromIn" || $("#eventType").val()=="fromOut")
	{
		$("#pageTypeDiv").hide();
		$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
		$("#fromDiv").show();
		$("#extraParamDiv").hide();$("#extraParam").val("");
		$("#siteNameDiv").hide();$("#siteName").val("");
		$("#tanchuDiv").hide();$("#tanchu").val("");
	}
	else if($("#eventType").val()=="unitParam")
	{
		$("#pageTypeDiv").hide();
		$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
		$("#fromDiv").hide();$("#from").val("");
		$("#extraParamDiv").hide();$("#extraParam").val("");
		$("#siteNameDiv").hide();$("#siteName").val("");
		$("#tanchuDiv").hide();$("#tanchu").val("");
	}
	else if($("#eventType").val()=="extraParam")
	{
		$("#pageTypeDiv").hide();
		$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
		$("#fromDiv").hide();$("#from").val("");
		$("#extraParamDiv").show();
		$("#siteNameDiv").hide();$("#siteName").val("");
		$("#tanchuDiv").hide();$("#tanchu").val("");
	}
	else if($("#eventType").val()=="tanchuPv")
	{
		$("#pageTypeDiv").hide();
		$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
		$("#fromDiv").hide();$("#from").val("");
		$("#extraParamDiv").hide();$("#extraParamDiv").val("");
		$("#siteNameDiv").hide();$("#siteName").val("");
		$("#tanchuDiv").show();
	}
}



//选择页面类型响应
function selectPageType()
{
	if($("#pageType").val()=="site")
		{
			//$("#pageTypeDiv").hide();
			$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
			$("#fromDiv").hide();$("#from").val("");
			$("#extraParamDiv").hide();$("#extraParam").val("");
			$("#siteNameDiv").show();
			$("#tanchuDiv").hide();$("#tanchu").val("");
		}
	else
		{
			$("#tongjiTagDiv").hide();$("#tongjiTag").val("");
			$("#fromDiv").hide();$("#from").val("");
			$("#extraParamDiv").hide();$("#extraParam").val("");
			$("#siteNameDiv").hide();$("#siteName").val("");
			$("#tanchuDiv").hide();$("#tanchu").val("");
		}
	
}



//下载
function download()
{
	var platForm = $("#platForm").val();
	var eventType = $("#eventType").val();
	var pageType = $("#pageType").val();
	var tongjiTag = $("#tongjiTag").val();
	var from = $("#from").val();
	var siteName = $("#siteName").val();
	var extraParam = $("#extraParam").val();
	var tanchu = $("#tanchu").val();
	
	//全部info由以下三部分组成
	//all = beginInfo + alertInfo + scriptBInfo + mainInfo + scriptEInfo +helpInfo;
	var beginInfo = "@pm, 直接把这一段复制到txt给rd就行。\n";//
	beginInfo = beginInfo +"*上线之前，参考  "+"http://wiki.58corp.com/index.php?title=%E7%BB%9F%E8%AE%A1%E4%BB%A3%E7%A0%81%E6%B5%8B%E8%AF%95"+"   进行统计效果测试*\n\n";
	var alertInfo = "\n";//重要声明字段
	var mainInfo = "\n";//主字段trackUrl
	var helpInfo = "\n";//字段说明
	var scriptBInfo = "<!--基本统计代码begin-->\n"; //脚本开始标记
	scriptBInfo = scriptBInfo + "<script type=\"text/javascript\">\n"; 
	
	
	
	//分平台的脚本结束标记
	var scriptEInfo_PC = "</SSScript> \n".replace("SSS","s");
	scriptEInfo_PC = scriptEInfo_PC + "<script src=\"http://tracklog.58.com/referrer4.js\"></SSScript>\n".replace("SSS","s");
	scriptEInfo_PC = scriptEInfo_PC + "<!--基本统计代码end-->\n"; 
	
	var scriptEInfo_M = "</SSScript> \n".replace("SSS","s");
	scriptEInfo_M = scriptEInfo_M + "<script src=\"http://tracklog.58.com/referrer_m.js\" async></SSScript>\n".replace("SSS","s");
	scriptEInfo_M = scriptEInfo_M + "<!--基本统计代码end-->\n"; 
	
	//基本trackUrl信息
	var mainInfo_PC_List = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'list\',\'page\':\'\',\'post_count\':\'实际返回的信息条数\',\'pagesize\':\'每页规定条数\',\'pagenum\':\'第几页\',\'level1\':\'一级补充条数\',\'level2\':\'二级补充条数\',\'level3\':\'三级补充条数\',\'level4\':\'四级补充条数\',\'level5\':\'五级补充条数\',\'level6\':\'六级补充条数\'}\";\n";
	var mainInfo_M_List = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'list\',\'page\':\'\',\'post_count\':\'实际返回的信息条数\',\'pagesize\':\'每页规定条数\',\'pagenum\':\'第几页\',\'level1\':\'一级补充条数\',\'level2\':\'二级补充条数\',\'level3\':\'三级补充条数\',\'level4\':\'四级补充条数\',\'level5\':\'五级补充条数\',\'level6\':\'六级补充条数\'}\";\n";

	var mainInfo_PC_Detail = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'detail\',\'page\':\'\',\'shopid\':\'店铺ID\',\'is_biz\':\'是否商家\',\'source\':\'信息来源\'}\";\n"; 
	var mainInfo_M_Detail = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'detail\',\'page\':\'\',\'shopid\':\'店铺ID\',\'is_biz\':\'是否商家\',\'source\':\'信息来源\'}\";\n"; 
	mainInfo_PC_Detail = mainInfo_PC_Detail + "var _trackParams=[{\"I\":某单元参数ID,\"V\":\"某单元参数值\"},{\"I\":某单元参数ID,\"V\":\"某单元参数值\"}];\n"; 
	mainInfo_M_Detail = mainInfo_M_Detail + "var _trackParams=[{\"I\":某单元参数ID,\"V\":\"某单元参数值\"},{\"I\":某单元参数ID,\"V\":\"某单元参数值\"}];\n"; 
	
	var mainInfo_PC_Home = "var _trackURL = \"{\'cate\':\'\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'home\',\'page\':\'\'}\";\n";
	var mainInfo_M_Home = "var _trackURL = \"{\'cate\':\'\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'home\',\'page\':\'\'}\";\n";
	
	var mainInfo_PC_Index = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'index\',\'page\':\'\'}\";\n";
	var mainInfo_M_Index = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'index\',\'page\':\'\'}\";\n";
	
	var mainInfo_PC_Post = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'post\',\'page\':\'细化页面类型\',\'poststep\':\'细化页面类型\'}\";\n";
	var mainInfo_M_Post = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'post\',\'page\':\'细化页面类型\'}\";\n";
	
	var mainInfo_PC_My = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'my\',\'page\':\'细化页面类型\'}\";\n";
	var mainInfo_M_My = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'my\',\'page\':\'细化页面类型\'}\";\n";
	
	var mainInfo_PC_Vip = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'vip\',\'page\':\'细化页面类型\'}\";\n";
	var mainInfo_M_Vip = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'vip\',\'page\':\'细化页面类型\'}\";\n";
	
	var mainInfo_PC_Pro = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'pro\',\'page\':\'细化页面类型\'}\";\n";
	var mainInfo_M_Pro = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'pro\',\'page\':\'细化页面类型\'}\";\n";
	
	var mainInfo_PC_Special = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'special\',\'page\':\'专题活动名\'}\";\n";
	var mainInfo_M_Special = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'special\',\'page\':\'专题活动名\'}\";\n";
	
	var mainInfo_PC_Site = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'站点名\',\'page\':\'细化页面类型\'}\";\n";
	var mainInfo_M_Site = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'站点名\',\'page\':\'细化页面类型\'}\";\n";
	
	var mainInfo_PC_Market = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'market\',\'page\':\'市场名\'}\";\n";
	var mainInfo_M_Market = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'market\',\'page\':\'市场名\'}\";\n";
	
	var mainInfo_PC_Other = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'页面类型\',\'page\':\'细化页面类型\'}\";\n";
	var mainInfo_M_Other = "var _trackURL = \"{\'cate\':\'表现类别ID全路径\',\'area\':\'表现地域ID全路径\',\'pagetype\':\'页面类型\',\'page\':\'细化页面类型\'}\";\n";
	
	
	
	
	
	//公共字段说明
	var helpInfo_Common ="\n字段说明： \n";
	helpInfo_Common = helpInfo_Common + "表现类别ID全路径:\t如：4,29（若无，置空即可）\n";
	helpInfo_Common = helpInfo_Common + "表现地域ID全路径:\t如：1,1143（若无，置空即可）\n";
	
	
	//各页面类型特有字段说明
	var helpInfo_List = "每页规定条数:\t每页规定的最大信息条数如：35 \n";
	helpInfo_List = helpInfo_List + "第几页:\t当前页码； \n";
	helpInfo_List = helpInfo_List + "实际返回的信息条数:\t列表页实际返回结果条数（包括普通信息、店铺、付费信息）； \n";
	helpInfo_List = helpInfo_List + "?key=站内搜索关键词:\t如果是搜索出的结果，这个字段则要有，如?key=刘德华   \n";
	helpInfo_List = helpInfo_List + "level1:\t一级补充（邻近地标、邻近价格、邻近居室）信息条数，条数为空则参数为0；\n"; 
	helpInfo_List = helpInfo_List + "level2:\t二级补充（上级地标）信息条数； \n";
	helpInfo_List = helpInfo_List + "level3:\t三级补充（全城）信息条数； \n";
	helpInfo_List = helpInfo_List + "level4:\t四级补充（周边城市）信息条数；\n"; 
	helpInfo_List = helpInfo_List + "level5:\t搜索补充 信息条数； \n";
	helpInfo_List = helpInfo_List + "level6:\t上级补充 (父级补充) 信息条数； \n";

	
	var helpInfo_Detail = "shopid:\t信息所属店铺的店铺ID（若无，置空即可）\n";
	helpInfo_Detail = helpInfo_Detail + "is_biz:\t0为个人，1为中介\n"; 
	helpInfo_Detail = helpInfo_Detail + "source:\t信息来源（值定义详见：http://wiki.58corp.com/index.php?title=Infodetail的第11字段）\n"; 
	helpInfo_Detail = helpInfo_Detail + "如需单元参数，请在_trackParams中进行扩展添加\n"; 
	helpInfo_Detail = helpInfo_Detail + "如需其他参数，请尽量只在_trackURL中进行扩展添加\n";
		
	
	var helpInfo_Post = "细化页面类型:\t发布系统里的具体页面类型，如：fillout、success\n";
	var helpInfo_Vip = "细化页面类型:\tvip中心里的具体页面类型，如：choosebigclass\n";
	var helpInfo_My = "细化页面类型:\tmy中心里的具体页面类型，如：choosebigclass\n";
	var helpInfo_Pro = "细化页面类型:\tpro专业版个人中心里的具体页面类型，如：choosebigclass\n";
	var helpInfo_Special = "专题活动名:\t如：double11\n";
	var helpInfo_Market = "市场名:\t如：如：huaxiang2sc，可截取目录名称（ 花乡， bj.58.com/huaxiang2sc/）\n";
	
	var helpInfo_Site = "站点名:\t如：about.58.com的就为about\n";
	helpInfo_Site = helpInfo_Site + "细化页面类型:\t站点下的具体页面类型，如：index\n";	
	
	var helpInfo_Home = "";
	var helpInfo_Index = "大类名称缩写： 如house";
	
	var helpInfo_Other = "页面类型:\t给你的页面类型命一个名，如：deliver\n";
	helpInfo_Other = helpInfo_Other + "细化页面类型:\t大类型下的具体页面类型，如：deliver_step1\n";	
	
	
	//PC端
	if(platForm == "PC")
	{
		//新页面PV
		if(eventType == "newPv")
		{
			
			if(pageType == "list")
			{
				alertInfo="注意：新列表页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
				mainInfo = scriptBInfo + mainInfo_PC_List + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_List;
			}
			if(pageType == "detail")
			{
				alertInfo="注意：新详情页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
				mainInfo = scriptBInfo + mainInfo_PC_Detail + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Detail;
			}
			if(pageType == "home")
			{
				alertInfo="注意：新城市首页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
				mainInfo = scriptBInfo + mainInfo_PC_Home + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Home;
			}
			if(pageType == "index")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Index + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Index;
			}
			if(pageType == "post")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Post + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Post;
			}
			if(pageType == "my")
			{
				mainInfo = scriptBInfo + mainInfo_PC_My + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_My;
			}
			if(pageType == "vip")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Vip + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Vip;
			}
			if(pageType == "shop")
			{
				alertInfo="注意：新店铺页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
			}
			if(pageType == "qiye")
			{
				alertInfo="注意：新企业页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
			}
			if(pageType == "special")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Special + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Special;
			}
			if(pageType == "site")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Site + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Site;
			}
			if(pageType == "other")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Other + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Other;
			}
			if(pageType == "market")
			{
				mainInfo = scriptBInfo + mainInfo_PC_Market + scriptEInfo_PC;
				helpInfo = helpInfo_Common + helpInfo_Market;
			}
			
		}
		else if(eventType == "click")
		{
			alertInfo="请先确保点击所在页面有基本统计js\n\n";
			if(tongjiTag == "")tongjiTag="XXXX";
			mainInfo = "添加onClick=\"clickLog(\'from=" +tongjiTag+"\');\"\n";
		}
		else if(eventType == "abClick")
		{
			alertInfo="请先确保点击所在页面有基本统计js\n\n";
			if(tongjiTag == "")tongjiTag="XXXX";
			mainInfo = "对于AB测的点击分别添加： onClick=\"clickLog(\'from="+tongjiTag+"_A\');\"\n";
			mainInfo = mainInfo + "onClick=\"clickLog(\'from="+tongjiTag+"_B\');\"\n";
		}
		else if(eventType == "fromIn")
		{
			alertInfo="请先确保目标页面有基本统计js\n\n";
			if(from == "")from="XXXX";
			mainInfo = "在站内入口所链向的url后添加参数  ?from="+from+"\n";
		}
		else if(eventType == "fromOut")
		{
			alertInfo="请先确保目标页面有基本统计js\n\n";
			if(from == "")from="XXXX";
			mainInfo = "在站外入口所链向的url后添加参数  ?utm_source="+from+"\n";
		}
		else if(eventType == "abPv")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "（1）在trackUrl中添加参数：\n";
			mainInfo = mainInfo + "     A版本的：\'version\':\'a\'   B版本的： \'version\':\'b\'\n";
		}
		else if(eventType == "unitParam")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "在_trackParams中添加参数：\n";
			mainInfo = mainInfo + "var _trackParams=[{\"I\":某单元参数ID,\"V\":\"某单元参数值\"},{\"I\":某单元参数ID,\"V\":\"某单元参数值\"}];\n"; 
		}
		else if(eventType == "extraParam")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "在trackUrl中添加额外参数： \'参数名\':\'参数值\'\n";
			
		}
		else if(eventType == "tanchuPv")
		{
			alertInfo="在弹出时（如onload时），响应此函数：\n\n";
			if(tanchu == "")tanchu="XXXX";
			mainInfo = "clickLog(\'from=" +tanchu+"\');\n";
			
		}
	}


	//M端
	else if(platForm == "M")
	{
		//新页面PV
		if(eventType == "newPv")
		{
			if(pageType == "list")
			{
				alertInfo="注意：新列表页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
				mainInfo = scriptBInfo + mainInfo_M_List + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_List;
			}
			if(pageType == "detail")
			{
				alertInfo="注意：新详情页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
				mainInfo = scriptBInfo + mainInfo_M_Detail + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Detail;
			}
			if(pageType == "home")
			{
				alertInfo="注意：新城市首页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
				mainInfo = scriptBInfo + mainInfo_M_Home + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Home;
			}
			if(pageType == "index")
			{
				mainInfo = scriptBInfo + mainInfo_M_Index + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Index;
			}
			if(pageType == "post")
			{
				mainInfo = scriptBInfo + mainInfo_M_Post + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Post;
			}
			if(pageType == "my")
			{
				mainInfo = scriptBInfo + mainInfo_M_My + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_My;
			}
			if(pageType == "vip")
			{
				mainInfo = scriptBInfo + mainInfo_M_Vip + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Vip;
			}
			if(pageType == "shop")
			{
				alertInfo="注意：新店铺页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
			}
			if(pageType == "qiye")
			{
				alertInfo="注意：新企业页统计代码规划请先找@lijun06，@zhanghao06确认后再加。\n\n";
			}
			if(pageType == "special")
			{
				mainInfo = scriptBInfo + mainInfo_M_Special + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Special;
			}
			if(pageType == "site")
			{
				mainInfo = scriptBInfo + mainInfo_M_Site + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Site;
			}
			if(pageType == "other")
			{
				mainInfo = scriptBInfo + mainInfo_M_Other + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Other;
			}
			if(pageType == "market")
			{
				mainInfo = scriptBInfo + mainInfo_M_Market + scriptEInfo_M;
				helpInfo = helpInfo_Common + helpInfo_Market;
			}
			
		}
		else if(eventType == "click")
		{
			alertInfo="请先确保点击所在页面有基本统计js\n\n";
			if(tongjiTag == "")tongjiTag="XXXX";
			mainInfo = "添加onClick=\"clickLog(\'from=" +tongjiTag+"\');\"\n";
		}
		else if(eventType == "abClick")
		{
			alertInfo="请先确保点击所在页面有基本统计js\n\n";
			if(tongjiTag == "")tongjiTag="XXXX";
			mainInfo = "对于AB测的点击分别添加： onClick=\"clickLog(\'from="+tongjiTag+"_A\');\"\n";
			mainInfo = mainInfo + "onClick=\"clickLog(\'from="+tongjiTag+"_B\');\"\n";
		}
		else if(eventType == "fromIn")
		{
			alertInfo="请先确保目标页面有基本统计js\n\n";
			if(from == "")from="XXXX";
			mainInfo = "在站内入口所链向的url后添加参数  ?from="+from+"\n";
		}
		else if(eventType == "fromOut")
		{
			alertInfo="请先确保目标页面有基本统计js\n\n";
			if(from == "")from="XXXX";
			mainInfo = "在站外入口所链向的url后添加参数  ?utm_source="+from+"\n";
		}
		else if(eventType == "abPv")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "（1）在trackUrl中添加参数：\n";
			mainInfo = mainInfo + "     A版本的：\'version\':\'a\'   B版本的： \'version\':\'b\'\n";
		}
		else if(eventType == "unitParam")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "在_trackParams中添加参数：\n";
			mainInfo = mainInfo + "var _trackParams=[{\"I\":某单元参数ID,\"V\":\"某单元参数值\"},{\"I\":某单元参数ID,\"V\":\"某单元参数值\"}];\n"; 
		}
		else if(eventType == "extraParam")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "在trackUrl中添加额外参数： \'参数名\':\'参数值\'\n";
			
		}
		else if(eventType == "tanchuPv")
		{
			alertInfo="在弹出时（如onload时），响应此函数：\n\n";
			if(tanchu == "")tanchu="XXXX";
			mainInfo = "clickLog(\'from=" +tanchu+"\');\n";
			
		}
	}	
	
	else if(platForm == "APP")
	{
		alertInfo = "暂不支持app端规划"
	}
	
	//weixin端
	else if(platForm == "WEIXIN")
	{
		//新页面PV
		if(eventType == "newPv")
		{
			alertInfo="微信还没这种页面的基本统计，请@lijun06,@zhanghao06\n\n";
		}
		else if(eventType == "click")
		{
			alertInfo="请先确保点击所在页面有基本统计js\n\n";
			if(tongjiTag == "")tongjiTag="XXXX";
			mainInfo = "添加onClick=\"clickLog(\'from=" +tongjiTag+"\');\"\n";
		}
		else if(eventType == "abClick")
		{
			alertInfo="请先确保点击所在页面有基本统计js\n\n";
			if(tongjiTag == "")tongjiTag="XXXX";
			mainInfo = "对于AB测的点击分别添加： onClick=\"clickLog(\'from="+tongjiTag+"_A\');\"\n";
			mainInfo = mainInfo + "onClick=\"clickLog(\'from="+tongjiTag+"_B\');\"\n";
		}
		else if(eventType == "fromIn")
		{
			alertInfo="请先确保目标页面有基本统计js\n\n";
			if(from == "")from="XXXX";
			mainInfo = "在站内入口所链向的url后添加参数  ?from="+from+"\n";
		}
		else if(eventType == "fromOut")
		{
			alertInfo="请先确保目标页面有基本统计js\n\n";
			if(from == "")from="XXXX";
			mainInfo = "在站外入口所链向的url后添加参数  ?utm_source="+from+"\n";
		}
		else if(eventType == "abPv")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "（1）在trackUrl中添加参数：\n";
			mainInfo = mainInfo + "     A版本的：\'version\':\'a\'   B版本的： \'version\':\'b\'\n";
		}
		else if(eventType == "unitParam")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "在_trackParams中添加参数：\n";
			mainInfo = mainInfo + "var _trackParams=[{\"I\":某单元参数ID,\"V\":\"某单元参数值\"},{\"I\":某单元参数ID,\"V\":\"某单元参数值\"}];\n"; 
		}
		else if(eventType == "extraParam")
		{
			mainInfo = "在页面原有统计代码中做更改如下：\n\n";
			mainInfo = mainInfo + "在trackUrl中添加额外参数： \'参数名\':\'参数值\'\n";
			
		}
		else if(eventType == "tanchuPv")
		{
			alertInfo="在弹出时（如onload时），响应此函数：\n\n";
			if(tanchu == "")tanchu="XXXX";
			mainInfo = "clickLog(\'from=" +tanchu+"\');\n";
			
		}
	}

	
	var ret = beginInfo + alertInfo + mainInfo + helpInfo;
	$("#result").val(ret);
			 
}




function callback() {
    setTimeout(function() {
        $( "#datepicker" ).fadeIn();
    }, 1000 );
};



</script>
</html>
